<%@page import="java.text.SimpleDateFormat"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="t" tagdir="/WEB-INF/tags" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>  

<t:wrapper>
    <jsp:body> 
		<h2><a href="${pageContext.request.contextPath}/User/Teacher/LessonForSubject?subject=${lesson.subject.id}">${lesson.subject.name}</a></h2>
		<h3>${lesson.room.typeRoom} -> ${lesson.readableStartHour} - ${lesson.readableEndHour} : Départment ${lesson.room.department.name} salle ${lesson.room.number}</h3>
		<p>Etudiant(s) présent(s) : </p>
		<form target="${pageContext.request.contextPath}/User/Teacher/CheckAbsence" method="post">
			<input type="hidden" name="lesson" value = "${lesson.id}" />
			<table>
				<c:forEach var="student" items="${students}">
					<tr>
					<td>${student.lastname} ${student.firstname} </td>
					<td><input type="checkbox" name="student_${student.id}" <c:if test="${empty student.absences}">checked</c:if> /></td>
					</tr>
				</c:forEach>
			</table>
			<input type="submit" value="Valider" />
		</form>
	</jsp:body>
</t:wrapper>